//
//  SubjectContentTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/11/7.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "SubjectContentTableViewCell.h"
#import "UILabel+NSAttributeString.h"
@implementation SubjectContentTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setModel:(SubjectLogs *)model
{
    _model=model;
    
    if (model.lev) {
        
           self.CheckContentLabel.attributedText=[self.CheckContentLabel StartWithStr:[NSString stringWithFormat:@"%@☆",model.name]];

    }else{
        
        self.CheckContentLabel.text=model.name;
        
    }

    switch (model.isOk) {
        case 0:
        {
            
            self.CheckResultImageView.image=[UIImage imageNamed:@"NotPass"];
            
        }
            break;
        case 1:
        {
             self.CheckResultImageView.image=[UIImage imageNamed:@"Pass"];
        }
            break;
            
        default:
        {
             self.CheckResultImageView.image=[UIImage imageNamed:@"NotSuit"];
        }
            
            break;
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
